<!DOCTYPE html>
<%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%>
<%@ include file="/common/includes.jsp"%>
<html>
<head>
<title>其他入库编辑</title>
<!-- import css and js -->
<%@ include file="/common/metaInput.jsp"%>
<script src="${ctx}/js/jsp/comm.js" type="text/javascript"></script>
<script type="text/javascript" src="${ctx}/js/My97DatePicker/WdatePicker.js"></script>
<script type="text/javascript" src="${ctx}/js/jsp/yd/logic/ItemStateData.js"></script>
<script src="${ctx}/js/jsp/date.js" type="text/javascript"></script>
<script type="text/javascript">
//打印需要的参数
	var obj= new Object();
	var basic_Url = "${ctx}/logic/otherInwh";
	var addressGrid;
	var print=false; //是否打印的状态标识 true 为打印  在 点击提交的时候进行打印
	$(function() {
		obj={'zd013TheSumMoney':$("#zd013TheSumMoney").val(),'zd013AccountName':$("#zd013AccountName").val(),'zd004WhName':$("#zd004WhName").val(),'zd006Aegnt':'${userName}','zd007Remark':$("#zd007Remark").val(),'zd010OtherDate': $("#zd010OtherDate").val(),'zd005PiCode':$("#zd005PiCode").val(),'zd011CustomerName':$("#zd011CustomerName").val(),'zd012MaterialInCode':$("#zd012MaterialInCode").val(),'zd001InCode':$("#zd001InCode").val()};
		$("#inputForm").validate({
			onsubmit : true,
			/*执行ajaxsubmit  */
			submitHandler : function(editform) {

				try {
					url = basic_Url + "/save.do";
					var api = frameElement.api;
					var W = api.opener;
					//getReturnMessage(url, "inputForm", success_function);
					//obj 主表对象 data 行记录 print 是不是为提交状态(提交才打印) where 什么的打印 区别 例如 其他入库，其他出库等
					var data=getNeedData(addressGrid.getData());
					getReturnMessageThree(url, "inputForm", W.searchAP,"",obj,data,print,"otherIn");
				} catch (e) {
					alert(e);
				}
			}
		});
		var zd003BillStatus=$("#zd003BillStatus").val();
		if(zd003BillStatus==''||zd003BillStatus=='OTHERWH_BACK'){//新增 或者是退会的时候
			$("#tr1").hide();
			$("#tr").hide();
			$("#save1").hide();
			$("#save2").hide();
			$("#save3").hide();
			$("#print1").hide();
			$("#print2").hide();
		}else if(zd003BillStatus=="OTHERWH_SAVE"){//保存 待提交
			$("#save").hide();
			$("#save2").hide();
			$("#save3").hide();
			if($("#zd006Aegnt").val()!="${user.name}"){
    			$("#save1").hide();
    			$("input[type!='hidden']").attr("disabled",true);//禁用SELECT标签
    			$("select").attr("disabled",true);//禁用SELECT标签
    			$("textarea").attr("disabled",true);//禁用TEXTAREA标签
               }  
		}else if (zd003BillStatus == "OTHERWH_AUDIT"){ // 提交 待审核
			$("#save").hide();
			$("#save1").hide();
			$("input[type!='hidden']").attr("disabled","disabled");//禁用SELECT标签
			$("select").attr("disabled","disabled");//禁用SELECT标签
			$("textarea").attr("disabled","disabled");//禁用TEXTAREA标签
		}else if ( zd003BillStatus == "OTHERWH_END"){//审核完成
			$("#save1").hide();
			$("#save2").hide();
			$("#save3").hide();
			$("#save").hide();
			$("input[type!='hidden']").attr("disabled","disabled");//禁用SELECT标签
			$("select").attr("disabled","disabled");//禁用SELECT标签
			$("textarea").attr("disabled","disabled");//禁用TEXTAREA标签
		}
		
		
		var column1 = [           
				    { display: 'id', name: 'id',type: 'string',hide:true},
				    { display: '物料id', name: 'zd002MaterialsId',width:1,hide:true},//使用selecturl时必须设置该属性
				    { display: '<font color="gray">物料编码</font>', name: 'zd002MaterialsCode', width: 120},
		            { display: '<font color="gray">名称</font>', name: 'zd002MaterialsName',width: 120},
		            { display: '<font color="gray">型号<font color="red">*</font></font>', name: 'zd004MaterialsModel' ,width: 120,editor : {type :'text'}},
		            { display: '<font color="gray">尺寸<font color="red">*</font></font>', name: 'zd005MaterialsSize' ,width: 120,editor : {type :'text'}},
		            { display: '<font color="gray">颜色<font color="red">*</font></font>', name: 'zd005MaterialsColor' ,width: 100,editor : {type :'text'}},
		            { display: '<font color="gray">材质<font color="red">*</font></font>', name: 'zd005MaterialsQuanlity' ,width: 120,editor : {type :'text'}},
		            { display: '<font color="gray">基本单位</font>', name: 'zd006Unit',width: 100,editor : {type :'text'}},
		            { display: '入库数量<font color="red">*</font>', name: 'zd007Quantity',editor : {type :'float'},width: 150,width: 150,render:function(item){
                   		var price = item.zd009Price;//单价
                   		var zdnum = item.zd007Quantity;//数量
                   		if((!isNaN(price)&&price!=''&&price!=null&&price!=undefined) && (!isNaN(zdnum)&&zdnum!=''&&zdnum!=null&&zdnum!=undefined)){
                   			item.zd014SumMoney = (parseFloat(price)*parseFloat(zdnum)).toFixed(4);
                   			getSumMoney();
                   		}
                	 	return (1*zdnum).toFixed(4);
                 	}},
                 	
	                { display: '单价<font color="red">*</font>', name: 'zd009Price' ,editor : {type :'float'},width: 150,render:function(item){
                   		var price = item.zd009Price;//单价
                   		var zdnum = item.zd007Quantity;//数量
                   		if((!isNaN(price)&&price!=''&&price!=null&&price!=undefined) && (!isNaN(zdnum)&&zdnum!=''&&zdnum!=null&&zdnum!=undefined)){
                   			item.zd014SumMoney = (parseFloat(price)*parseFloat(zdnum)).toFixed(4);
                   			getSumMoney();
                   		}
                	 	return (1*price).toFixed(4);
                 	}},
                    { display: '反审数量<font color="red">*</font>', name: 'zd007BackQuantity',width: 150,render:function(item){
		            	if(isNaN(item.zd007BackQuantity)){
		            		return '0.00';
		            	}else{
		            		return item.zd007BackQuantity;
		            	}
		            }},
	                { display: '总金额<font color="red">*</font>', name: 'zd014SumMoney',width: 150},
	                { display: '描述', name: 'zd015MaterDecript' ,width: 120,editor : {type :'text'}}
	                ];
	var column2 = [
				    { display: 'id', name: 'id',type: 'string',hide:true},
				    { display: '物料id', name: 'zd002MaterialsId',width:1,hide:true},//使用selecturl时必须设置该属性
				    { display: '<font color="gray">物料编码</font>', name: 'zd002MaterialsCode', width: 120},
		            { display: '<font color="gray">名称</font>', name: 'zd002MaterialsName',width: 120},
		            { display: '<font color="gray">型号</font>', name: 'zd004MaterialsModel' ,width: 120},
		            { display: '<font color="gray">尺寸<font color="red">*</font></font>', name: 'zd005MaterialsSize' ,width: 120,editor : {type :'text'}},
		            { display: '<font color="gray">颜色<font color="red">*</font></font>', name: 'zd005MaterialsColor' ,width: 100,editor : {type :'text'}},
		            { display: '<font color="gray">材质<font color="red">*</font></font>', name: 'zd005MaterialsQuanlity' ,width: 120,editor : {type :'text'}},
		            { display: '<font color="gray">基本单位</font>', name: 'zd006Unit' ,width: 100,editor : {type :'text'}},
		            { display: '入库数量<font color="red">*</font>', name: 'zd007Quantity',width: 150},
		            { display: '单价<font color="red">*</font>', name: 'zd009Price',width: 150},
		            { display: '反审数量<font color="red">*</font>', name: 'zd007BackQuantity',width: 150,render:function(item){
		            	if(isNaN(item.zd007BackQuantity)){
		            		return '0.00';
		            	}else{
		            		return item.zd007BackQuantity;
		            	}
		            }},
		            { display: '总金额<font color="red">*</font>', name: 'zd014SumMoney' ,width: 150},
		            { display: '描述', name: 'zd015MaterDecript' ,width: 120}
		          ];
	 var column3 = null;
		               if ('${xx}' == 1){
		               	column3 = column1;
		               }else 
		               	column3 = column2;
		               addressGrid = $("#dataGrid1").ligerGrid({
		           		 columns: column3,
		           	                    enabledEdit : true,
		           	                    usePager: true,
		           	      				width : '99%',
		           	      				pageSize:1000,
		           	      				pageSizeOptions:[1000],
		           	      				parms:[{ name : 'id' , value : '${oi.id}'}],
		    	      		        	url : basic_Url+"/griditems.do",
		           	      				rownumbers : false,
		           	      				checkbox : true,
		           	                    height : '90%',
		           		toolbar : {
		           			items : [ {
		           				text : '新增',
		           				disable : true,
		           				click : function() {
		           					if ('${xx}' == 1){
		        						if($("#zd004WhCode").val()==''){
		        							$.dialog.alert("请先选择入库仓库");
		        							return false;
		        						}else{
			           						getDG().dialog({
			           				    		title:'选择材料',
			           				    		width : 800,
			           							height : 400,
			           							content: 'url:' + sys_context+'/public/windowalert/itemmanager.do',//
			           				    		lock : true,
			           				    		max : true,
			           				    		min : true,
			           				    		ok: function(){
			           				    			var rows = this.content.getSelected();
			           								if (rows != null) {
			           									for (var i = 0; i < rows.length;i++){
			           										var row = rows[i];
			           										addressGrid.addRow2({
			           											zd002MaterialsId : row.id,
			           											zd002MaterialsCode : row.zd001Code,
			           											zd002MaterialsName : row.zd002Name,
			           											zd004MaterialsModel : row.zd004Model,
			           											zd005MaterialsSize : row.zd026Size,
			           											zd005MaterialsColor : row.zd033Color,
			  		 											zd005MaterialsQuanlity : row.zd034Quality,
			           											zd006Unit : row.basicStapleUnitDO.zd002Name
			           										
			           										});
			           									}
			           								}
			           				    			this.content.Close();
			           				        		return false;
			           				    	    },
			           				    	    cancelVal: '关闭',
			           				    	    cancel: true 
			           				    	}).zindex();
		        						}
		           					}
		           				},
		           				icon: 'add'
		           			}, 
		           		 <c:if test="${oi.zd003BillStatus == null ||oi.zd003BillStatus =='OTHERWH_SAVE'}">
		           			{line : true},
		           			{text : '复制物料',click : addWindow,icon: 'add'},
		           			</c:if>
		           			{line : true}, {
		           				text : '删除',
		           				click : function() {
		           					if ('${xx}' == 1){
		           					addressGrid.deleteSelectedRow();
		           					}
		           				},
		           				img : '${ctx}/js/ligerUI/skins/icons/delete.gif'
		           			}]
		           		}});
	});
	function submitForm(param) {
	 	$("#zd003BillStatus").val(param);
	 	var dataInfo=$("#dataGrid1").ligerGetGridManager().getData();
	 	for(var i=0;i<dataInfo.length;i++){
	 		dataInfo[i].zd016Order=i+"";
	 	}
	 	$("#addressInfos").val(JSON.stringify(dataInfo));
		var data = $("#dataGrid1").ligerGetGridManager().getData();
		var br=false;
		var arr= new Array();
		for(var i=0;i<data.length;i++){
			var key=data[i].zd002MaterialsName+"_"+data[i].zd002MaterialsCode+"_"+data[i].zd004MaterialsModel+"_"+data[i].zd005MaterialsSize+"_"+data[i].zd005MaterialsColor+"_"+data[i].zd005MaterialsQuanlity;
			arr[i]=key;
			for(var j = 0 ;j<i;j++){
				if(arr[j]==key){
					$.dialog.alert("数据错误,您的第"+(i+1)+"和第"+(j+1)+"条的物品是同一物品,请确认后提交");
					br=true;
					break;
				}			
			}
			if(br){
				return false;
				break;
			}
		}
		if(data.length==0){
			$.dialog.alert("请增加物料信息");
	   	 	return false;
		}
		if($("#zd005PiCode").val()==""){
			$.dialog.alert("PI好不能为空");
		}
		var ba=true;
		if(data !=null){
			for (var i = 0;i < data.length;i++){
				var row = data[i];
				
				if (undefined == row.zd006Unit|| null == row.zd006Unit||row.zd006Unit=="") {
					$.dialog.alert("第" + (i+1) + "行的单位没有选择");
					ba = false;
					return false;
				}
				/* if (undefined == row.zd009Price|| null == row.zd009Price||row.zd009Price=="") {
					$.dialog.alert("第" + (i+1) + "行的单价没有填写");
					ba = false;
					return false;
				} */
				if(undefined == row.zd007Quantity
						|| isNaN(row.zd007Quantity)
						|| row.zd007Quantity <= 0){
		           	 $.dialog.alert("您第"+(i+1)+"行的“入库数量”不合法");
		           	 ba=false;
		           	 return false;
		        }
			}
			
		}
		//设置ajax全局同步
		jQuery.ajaxSettings.async = false;
		if(ba){
			$("#submitFlag").val(param);
			//判断是否为提交 在提交的时候打印
			if(param=='OTHERWH_AUDIT'){
				print=true;
			}
			$("#inputForm").submit();
		}
	}
	//取得总金额
	function getSumMoney(){
		var zdTheSumMoney = '0';
		var cRows = addressGrid.getData();
		for(var i=0; i<cRows.length; i++){
			var cRow = cRows[i];
			var sumMoney = cRow.zd014SumMoney;
			if(sumMoney==null||sumMoney==''||sumMoney==undefined||isNaN(sumMoney)){
				sumMoney = '0';
			}
			zdTheSumMoney = parseFloat(zdTheSumMoney)+parseFloat(sumMoney);
		}
		$("#zd013TheSumMoney").val(zdTheSumMoney.toFixed(4));
	}
	
	function check(){
		$.ajax({
		      url: "${ctx}/logic/otherInwh/updateState.do",
		      global: false,
		      type: "POST",
		      dataType: "json",
		      data: ({
		    	   rows:$("#id").val()
		      }),		     
		      success: function(msg){
		    	  if(msg.msg=="SUCCESS"){
		    		  $.dialog.alert("驳回成功",function(){close();});
		    	  }
		    	  if(msg.msg=="ERROR"){
		    		  $.dialog.alert("操作失败",function(){close();});
		    	  }
		   }
		});
	}
    
	function close(){
		var api = frameElement.api;
		var W = api.opener;
		CloseDialog();
		W.searchAP();
	}
	//出库仓库
	function  SotrageinfoWindow() {
		getDG().dialog(
				{
					title : '选择仓库',
					width : 650,
					height : 350,
					content : 'url:' + sys_context + '/public/windowalert/sotrageinfo.do?roleQuery=y',    
					lock : true,
					max : true,
					min : true,
					ok : function() {
						var rows = this.content.getSelected();
						if(rows==null){
							$.dialog.alert("请选择数据");
							return;
						}
						else{
							if(rows.length>1){
								$.dialog.alert('只能选择一行数据!');
								return;
							}else{
								$(rows).each(function() {
									$("#zd004Whid").val(this.id);
									$("#zd004WhCode").val(this.zd002Code);
									$("#zd004WhName").val(this.zd003Name);
							  });
							}
						}
						this.content.Close();
						return false;
					},
					cancelVal : '关闭',
					cancel : true
				}).zindex();
	}
	

	
	
	//客户列表
	function CompanyWindow() {
		getDG().dialog(
				{
					title : '选择供应商',
					width : 650,
					height : 350,
					content : 'url:' + sys_context + '/public/windowalert/company.do?zdType='+" ",    
					lock : true,
					max : true,
					min : true,
					ok : function() {
						var rows = this.content.getSelected();
						if(rows==null){
							$.dialog.alert("请选择数据");
							return;
						}
						else{
							if(rows.length>1){
								$.dialog.alert('只能选择一行数据!');
								return;
							}else{
								$(rows).each(function() {
									$("#zd011CustomerCode").val(this.zd001Code);
									$("#zd011CustomerID").val(this.id);
									$("#zd011CustomerName").val(this.zd003ZhName);
							  });
							}
						}
						this.content.Close();
						return false;
					},
					cancelVal : '关闭',
					cancel : true
				}).zindex();
	}
	function PrintView(type){
		if(type==1){
			window.parent.parent.loadPrint(obj,getNeedData(addressGrid.getData()),"otherIn",false);
		}else{
			window.parent.parent.loadPrint(obj,getNeedData(addressGrid.getData()),"otherIn",true);
		}
	}
	function getNeedData(data){
		var arr= new Array();
		for(var i=0;i<data.length;i++){
			if(!isNaN(data[i].zd007BackQuantity)){
				data[i].zd007Quantity=parseFloat(data[i].zd007Quantity)-parseFloat(data[i].zd007BackQuantity);
			}
			if(parseFloat(data[i].zd007Quantity)!=0){
				arr.push(data[i]);
			}
		}
		return arr;
	}
	
	function getCustomer(){
		var pi=$("#zd005PiCode").val();
		if(pi==""){//为空时是备货
			return;
		}
		$.ajax({
			url:"${ctx}/logic/sales/getCustomer.do",
			global: false,
			type:"POST",
			dataType:"json",
			data:({"picode":pi}),
			 success: function(msg){
		    	  if(msg.msg=="success"){
						$("#zd013AccountID").val(msg.customerId);
						$("#zd013AccountName").val(msg.customerName);
						$("#zd013AccountCode").val(msg.customerCode);
					}else{
						$("#zd022AccountID").val("");
						$("#zd022AccountName").val("");
						$("#zd022AccountCode").val("");
						if(msg.msg==0){
							$.dialog.alert("这个PI号不存在，或者含有此PI号的销售订单没有保存");
						}else{
							$.dialog.alert("PI号出现重复，请检查确认后重新出入");
						}
					}
		   }
		});
	}
	//复制物料
		function addWindow(){
			var cRows = addressGrid.getCheckedRows();
			if(cRows.length==0){
				$.dialog.alert("请选择要复制的物料行！");
				return false;
			}
			var manager = $("#dataGrid1").ligerGetGridManager();
			for(var i=0; i<cRows.length;i++){
				manager.addRow({
					zd002MaterialsId : cRows[i].zd002MaterialsId,
					zd002MaterialsCode : cRows[i].zd002MaterialsCode,
					zd002MaterialsName : cRows[i].zd002MaterialsName,
					zd004MaterialsModel : cRows[i].zd004MaterialsModel,
					zd005MaterialsSize : cRows[i].zd005MaterialsSize,
					zd005MaterialsColor : cRows[i].zd005MaterialsColor,
					zd005MaterialsQuanlity : cRows[i].zd005MaterialsQuanlity,
					zd006Unit : cRows[i].zd006Unit
				});
			};
		}
		
</script>

</head>

<body>

	<form id="inputForm" action="" method="post">
		<input type="hidden" id="id" name="id" value="${oi.id}" />
		<input type="hidden" id="addressInfos" name="addressInfos"/>
		<input type="hidden" id="dataItem" name="dataItem"/>
		<input type="hidden" id="bizVersion" name="bizVersion" value="${oi.bizVersion}"/>
		<input type="hidden" id="zd003BillStatus" name="zd003BillStatus" value="${oi.zd003BillStatus}"/>
		<!-- 用于标识提交按钮 -->
		<input type="hidden" id="submitFlag" value="" />
		<div class="pageContent">
			<div class="panel">
				<table class="TableBlock">
					<tr >
					 	<td nowrap id="tr1">单号:</td>
						<td id='tr'><input class="inp_width_98p" type="text" id="zd001InCode" name="zd001InCode" readonly="readonly"  value="${oi.zd001InCode}" /></td>
						 <td nowrap >送货单号:</td>
						<td ><input   type="text" id="zd012MaterialInCode" name="zd012MaterialInCode"  value="${oi.zd012MaterialInCode}" /></td>
					 </tr>
					<tr>
					 	<td nowrap>入库仓库:</td>
						<td>
						      <input type="hidden" id="zd004WhCode" name="zd004WhCode" value="${oi.zd004WhCode}"/>
   		                      <input type="text" id="zd004WhName" name="zd004WhName" readonly="readonly" value="${oi.zd004WhName}"/>
	   		            	  <input type="hidden" style="width:200px;" id="zd004Whid"  name="zd004Whid" value="${oi.zd004Whid}" />
   		        			  <input type="button" value="..." onclick="SotrageinfoWindow();" />
						</td>
						
					 	<td nowrap>入库时间:</td>
						<td><input id="zd010OtherDate" name="zd010OtherDate" class="inp_width_98p required" onclick="WdatePicker({dateFmt:'yyyy-MM-dd'})" value="<fmt:formatDate value="${oi.zd010OtherDate}" pattern="yyyy-MM-dd" type="both" />" /></td>
						 	 <c:if test="${oi.zd010OtherDate == null}">
									<script>
										var date = new Date();
										$("#zd010OtherDate").val(date.getFullYear() + '-' + (date.getMonth() + 1) + '-' + date.getDate());
									</script>
							 </c:if>
					</tr>
					 <tr>
   		            	<td nowrap="nowrap">供应商编号:</td>
   		           		<td><input type="text" style="width:200px;" id="zd011CustomerCode" name="zd011CustomerCode" value="${oi.zd011CustomerCode}" readonly="readonly" class=" required"></input>
   		           		<input type="button" value="..." onclick="CompanyWindow();" />
   		           		</td>
   		           		<td nowrap="nowrap">供应商名称:</td>
   		           		<td>
   		                 <input type="text" style="width:200px;" id="zd011CustomerName" readonly="readonly" name="zd011CustomerName" value="${oi.zd011CustomerName}" class="required"></input>
   		                 <input  type="hidden" name="zd011CustomerID"  id="zd011CustomerID" value="${oi.zd011CustomerID}"/>
   		                 </td>
   		           		
   		           </tr>
					<tr>
						<td nowrap>PI单号:</td>
						<td> 
							<input type="text" id="zd005PiCode" name="zd005PiCode" onchange="getCustomer();" class="inp_width_98p required" value="${oi.zd005PiCode}" />
						</td>
						<td nowrap>制单人:</td>
						<td> 
							<input type="text" id="zd006Aegnt" name="zd006Aegnt" class="inp_width_98p" value="${user.name}" readonly="readonly"/>
							<c:if test="${oi.zd006Aegnt != null}">
								<script>
									$("#zd006Aegnt").val("${oi.zd006Aegnt}");
								</script>
							</c:if>
						</td>
					</tr>
					<tr>
						<td nowrap>客户名称:</td>
						<td> 
							<input type="text" id="zd013AccountName"  name="zd013AccountName" class="inp_width_98p" value="${oi.zd013AccountName}" />
							<input type="hidden" id="zd013AccountID"   name="zd013AccountID" class="inp_width_98p" value="${oi.zd013AccountID}" />
						</td>
						<td nowrap>客户编码:</td>
						<td> 
							<input type="text" id="zd013AccountCode" name="zd013AccountCode" class="inp_width_98p" value="${oi.zd013AccountCode}" readonly="readonly"/>
						</td>
					</tr>
					<tr>
						<td nowrap>总金额:</td>
						<td>
							<input class="inp_width_98p" type="text" id="zd013TheSumMoney" name="zd013TheSumMoney" readonly="readonly"  value="${oi.zd013TheSumMoney}" />
						</td>
						<td nowrap>备注:</td>
						<td><input class="inp_width_98p"  type="text" id="zd007Remark" name="zd007Remark"  value="${oi.zd007Remark}" /></td>
					</tr>
					<tr>
						<td colspan="4" style="margin-bottom: 10px;"><div
								id="dataGrid1"></div></td>
					</tr>
				</table>
			</div>
			<div class="formBar">
				<ul>
					 <li><div class="buttonActive"><div class="buttonContent"><button type="button" id="save" onclick="submitForm('OTHERWH_SAVE')">保存</button></div></div></li>
					 <li><div class="buttonActive"><div class="buttonContent"><button type="button" id="save1" onclick="submitForm('OTHERWH_AUDIT')">提交</button></div></div></li>
		        <webres:displaycontroller elementId="LOGIC_OIWH_RK_SP" description="其他入库单审批">
			       <li><div class="buttonActive"><div class="buttonContent"><button type="button" id="save2" onclick="submitForm('OTHERWH_END')">审核通过</button></div></div></li>
			    </webres:displaycontroller>
			    <webres:displaycontroller elementId="LOGIC_OIWH_RK_PH" description="其他入库单驳回">   
			       <li><div class="buttonActive"><div class="buttonContent"><button type="button" id="save3" onclick="check()">驳回</button></div></div></li>
		       </webres:displaycontroller>
		      
		       	<li id=print1><div class="buttonActive"><div class="buttonContent"><button type="button" id="forPrint" onclick="PrintView(1);">打印预览</button></div></div></li>
		      	<li id=print2><div class="buttonActive"><div class="buttonContent"><button type="button" id="forPrint" onclick="PrintView(2);">打印</button></div></div></li>
		       
		       <li><div class="button"><div class="buttonContent"><button type="button" class="print" onclick="CloseDialog()">关闭</button></div></div></li>
				</ul>
			</div>
		</div>
	</form>
</body>
</html>
